package com.hyt.it.ogt.kq.service.gov.feign.cloudefile;

import com.hyt.common.apiInfor.ApiResponse;
import com.hyt.loginfo.config.OAuth2FeignRequestConfig;
import com.hyt.model.cloudefile.apiparams.FileRecodeParam;
import com.hyt.model.cloudefile.apiparams.PushTaskParam;
import com.hyt.model.cloudefile.entity.CloudeFileProjectRecord;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * description 远程调用推送任务信息类
 *
 * @author yaojian
 * @createTime 2021/12/06
 */
@FeignClient(value = "it-ogt-webcommon", fallbackFactory = CloudFileClientHystrix.class, configuration = OAuth2FeignRequestConfig.class)
public interface CloudFileClient {

    /**
     * 根据考试id获取考试信息
     *
     * @param pushTaskParam
     * @return
     */
    @RequestMapping(value = "/api/pushTask", method = RequestMethod.POST)
    ApiResponse<Boolean> pushTask(@RequestBody PushTaskParam pushTaskParam);

    /**
     * 根据考试id获取考试信息
     *
     * @param fileRecodeParam
     * @return
     */
    @RequestMapping(value = "/api/queryLastFileRecode", method = RequestMethod.POST)
    ApiResponse<CloudeFileProjectRecord> queryLastFileRecode(@RequestBody FileRecodeParam fileRecodeParam);

    /**
     * 生成考生准考证
     *
     * @param examineeInfoId
     * @return
     */
    @GetMapping("/api/admission/ticket/generateExaminee")
    ApiResponse<Boolean> generateExaminee(@RequestParam String examineeInfoId);

    /**
     * 生成批次准考证
     *
     * @param examineeTimeId
     * @return
     */
    @GetMapping("/api/admission/ticket/generateTimes")
    ApiResponse<Boolean> generateTimes(@RequestParam String examineeTimeId);

    /**
     * PDF添加水印
     *
     * @param pdfUrl
     * @param waterText 水印文字
     * @return
     */
    @GetMapping("/api/pdf/waterMark")
    ApiResponse<String> waterMark(@RequestParam String pdfUrl, @RequestParam String waterText);
}
